package com.yanqu.road.entity.activity.daomu.enums;

public enum DaoMuAttributeEnum {

    ATTRIBUTE_HP(1, "生命"),
    ATTRIBUTE_ATT(2, "攻击"),
    ATTRIBUTE_DEFEND(3, "防御"),
    ATTRIBUTE_SPEED(4, "移速"),
    ATTRIBUTE_CRITICAL_RATE(5, "暴击率"),
    ATTRIBUTE_CRITICAL_ATT(6, "暴击伤害"),
    ATTRIBUTE_NOT_HARM(7, "伤害减免率"),
    ATTRIBUTE_RECOVER_HP_PVE(8, "回血"),
    ATTRIBUTE_HARM_ADD_RATE(101, "伤害加成"),

    /**
     * pvp战斗属性
     */
    ATTRIBUTE_RECOVER_HP_PVP(201, "生命恢复速度"),
    ATTRIBUTE_BULLET_LIMIT(202, "武器数量上限"),
    ATTRIBUTE_BULLET_RECOVER(203, "武器恢复间隔"),
    ATTRIBUTE_BULLET_ROTATIONAL_SPEED(204, "武器转速"),
    ATTRIBUTE_PICKING_DISTANCE(205, "拾取距离");


    /**
     * 类型
     */
    private int type;

    /**
     * 名称
     */
    private String name;

    DaoMuAttributeEnum(int type, String name) {
        this.type = type;
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static DaoMuAttributeEnum forValue(int type) {
        for (DaoMuAttributeEnum attributeEnum : values()) {
            if (attributeEnum.getType() == type) {
                return attributeEnum;
            }
        }
        return null;
    }
}
